<?php
class controls{
    function get_text($name, $value=''){
        return "<input class='input-medium' type='text' value='{$value}' name='{$name}' id='{$name}' />";
    }
    
    function get_textSmall($name, $value=''){
        return "<input class='input-small' type='text' value='{$value}' name='{$name}' id='{$name}' />";
    }
    
    function get_textReadOnly($name, $value=''){
        return "<input class='input-medium' type='text' value='{$value}' name='{$name}' id='{$name}' readonly='readonly'/>";
    }
    
    function get_textLager($name, $value=''){
        return "<input class='input-flex' type='text' value='{$value}' name='{$name}' id='{$name}'/>";
    }
    
    function get_file($name, $value=''){
        return "<input type='file' value='{$value}' name='{$name}' id='{$name}'/>";
    }
    
    function get_textHidden($name, $value=''){
        return "<input type='hidden' value='{$value}' name='{$name}' id='{$name}'/>";
    }
    
    function get_password($name, $value=''){
        return "<input class='input-medium' type='password' value='{$value}' name='{$name}' id='{$name}'/>";
    }
    
    function get_textarea($name, $value='', $cols='', $rows=''){
        return "<textarea name='{$name}' id='{$name}' cols='{$cols}' rows='{$rows}'>{$value}</textarea>";
    }
    
    function get_textareaReadOnly($name, $value='', $cols='', $rows=''){
        return "<textarea name='{$name}' id='{$name}' cols='{$cols}' rows='{$rows}' readonly='readonly'>{$value}</textarea>";
    }
    
    function get_button($name, $value){
        return "<input class='button' id='{$name}' name='{$name}' type='submit' value='{$value}'/>";
    }
    
    function get_checkbox($name, $value, $checked=''){
        if($checked == '') $checked = ''; 
        else $checked = 'checked';
        return "<input type='checkbox' value='{$value}' name='{$name}' id='{$name}' {$checked} />";
    }
    
    function get_radio($name, $value, $checked){
        if($checked == 1){
            return "<input id='{$name}' name='{$name}' type='radio' value='{$value}' checked='checked' />";
        }else{
            return "<input id='{$name}' name='{$name}' type='radio' value='{$name}' />";
        }
    }
    
    function get_label($name, $class=''){
        return "<label class='{$class}'>{$name}</label>";
    }
    
    function __($value){
        return $value;
    }
}
?>
